package serverdata.ch.home.www.ResponseClass;

public class URICoding {

	public enum Urisensor{
		ALLSENSOREXISTING,
		SENSORVALUES,
		URINOTEXIST,
		INDEX
	}

	private Urisensor uri=null;

	public URICoding(String URI) {
		if(URI.equalsIgnoreCase("/")){
			uri = Urisensor.INDEX;
		}else{
			for(Urisensor urisensor : Urisensor.values()){
				if(URI.substring(1).equalsIgnoreCase(urisensor.toString())){
					uri = urisensor;
				}
			}

			if(uri == null){
				uri = Urisensor.URINOTEXIST;
			}
		}
	}

	public Urisensor getURI(){
		return uri;
	}


}
